Skip to content

updated build setup to modern pyproject.toml form.#3783

Merged
mmerickel merged 23 commits intoPylons:mainfrom
ChrisBarker-NOAA:main
Feb 25, 2026
Merged

updated build setup to modern pyproject.toml form.#3783
mmerickel merged 23 commits intoPylons:mainfrom
ChrisBarker-NOAA:main

Conversation

@ChrisBarker-NOAA
Copy link
Contributor

@ChrisBarker-NOAA ChrisBarker-NOAA commented May 27, 2025

I've moved everything from setup.py and setup.cfg to pyproject.toml.

It seems to build fine :-)

There doesn't seem to be a clear way to specify test and docs requirements, so I added:

requirements_test.txt and requirements_docs.txt

Or maybe tox takes care of that now?

I also didn't update any pinned versions....

[though I changed the min Python version to 3.9, and added 3.13 to the tox test list]

I'm not set up to properly run tox, so maybe there's something more to do there, but I kept it as it was, other than the python versions in the test matrix.

@merwok
Copy link
Contributor

merwok commented May 28, 2025

Or maybe tox takes care of that now?

Dependency groups have been standardized, you could define them.
Personally I still use pip-sync inside tox envs, so I have separate runtime / tests + lint requirements.

@robvdl
Copy link
Contributor

robvdl commented May 28, 2025

Instead of having the files requirements_docs.txt and requirements_test.txt you can add these as optional-dependencies to the pyproject.toml:

[project.optional-dependencies]
doc = [
    "Sphinx >= 3.0.0",
    # ...
]
test = [
    "webtest >= 1.3.1",
    # ...
]

@stevepiercy
Copy link
Member

Another way to declare dependencies. uv supports both this option and the one @robvdl mentioned. https://docs.astral.sh/uv/concepts/projects/dependencies/

[dependency-groups]
dev = [
    "webtest>=1.3.1",
]
docs = [
    "Sphinx>=3.0.0",
]

@ChrisBarker-NOAA
Copy link
Contributor Author

I tried to allow changes by project admins -- so feel free to go fix stuff yourselves :-)

Meanwhile, I'll address a few points now.

@ChrisBarker-NOAA
Copy link
Contributor Author

uv supports both this option and the one @robvdl mentioned.

if that's the case, then I"ll go with option (1) :)

But if the project wants to go to uv (or hatch?) rather than setuptools, then we can follow the appropriate route.

But anyway, we need something that pip understands .... it looks like option(1) works -- I'll push and see if the RTD CI script works.

@ChrisBarker-NOAA
Copy link
Contributor Author

OK -- all looking good. Note that the gitHub workflows aren't running, so could be broken -- that needs approval from a maintainer.

Also -- it looks like the docs are being built on RTD, and also in a gitHub workflow -- is one of these obsolete?

Finally -- I suspect the tox config could use some updating, but that's not my wheelhouse.

@stevepiercy
Copy link
Member

Also -- it looks like the docs are being built on RTD, and also in a gitHub workflow -- is one of these obsolete?

If I understand correctly, the workflow is for testing that docs will build, whereas the RTD config is for deployment of docs after merging the PR.

@stevepiercy
Copy link
Member

RTD pull request preview:

https://pylons--3783.org.readthedocs.build/projects/pyramid/en/3783/

Lots of failing CI checks, though.

Co-authored-by: Steve Piercy <[email protected]>
@ChrisBarker-NOAA
Copy link
Contributor Author

Lots of failing CI checks, though.

yup -- I couldn't test until they go turned on ....

I'll see what I can figure out.

@ChrisBarker-NOAA
Copy link
Contributor Author

hmm -- looks like the workflow still needs to be approved, so I can't see if the CI will work.

But in any case, it's a tox config issue, I I really don't know tox.

I did add the test dependencies, and that has helped some (locally) -- though it seem that tox should be able to get those from the pyproject.toml,. if we can find the right configuration.

@ChrisBarker-NOAA
Copy link
Contributor Author

If I understand correctly, the workflow is for testing that docs will build, whereas the RTD config is for deployment of docs after merging the PR.

Ahh -- that makes sense, yes.

@ChrisBarker-NOAA
Copy link
Contributor Author

Ping! Can we get this rolling again?

I think it needs a bit more -- e.g. we should now pin setuptools, and maybe remove py3.9 and add py3.14 (if that doesn't break anything).

(and for both those reasons, and maybe more, a point release might be in order)

I can't recall where I left off with this -- but I'll refresh my brain if someone will agree to review and merge.

I think I was stuck on the CI not having permission to run on the PR, so I can't really test anything :-(

@mmerickel
Copy link
Member

@ChrisBarker-NOAA I think this is pretty good - do you have time to fix it in the next day or so? Otherwise I may try to finish it up. Let me know - thanks!

@ChrisBarker-NOAA
Copy link
Contributor Author

I'll try to clean it up now :-)

@ChrisBarker-NOAA
Copy link
Contributor Author

I think I've got the tox ini working right now for the deps.

though I can't run it all locally, so ???

I'm also getting a failure in check-manifest that confuses me:

lint: commands[3]> check-manifest
lists of files in version control and sdist do not match!
missing from VCS:
  setup.cfg

I can't see where setup.cfg is getting added to the manifest??

Anyway -- I really dont know tox, so any more is up to you :-)

@mmerickel
Copy link
Member

No problem I'll run with this and tweak it to where I want it to be. You already did the annoying parts of the conversion! Thank you so much for working on it.

@ChrisBarker-NOAA
Copy link
Contributor Author

Getting there -- thanks!

@mmerickel
Copy link
Member

@ChrisBarker-NOAA I pushed several changes, can you let me know if you approve or see anything more that I missed? Thank you!

@mmerickel mmerickel merged commit e6f8ab8 into Pylons:main Feb 25, 2026
32 checks passed
@ChrisBarker-NOAA
Copy link
Contributor Author

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants